package com.hyg.lib_base.MyView;

import android.os.Parcel;
import android.os.Parcelable;

public class BodyConstitutionPoint implements Parcelable {
    /*   体质数据模板   */

    private String BodyConstitutionTypes = "";//体质名称
    private double SelectionScore = 0.0;       //体质选择分值；
    private double ConversionScore = 0.0;       //体质转化分值；
    private String QuestionNum = "0";//体质问题数量
    private String BCTInfo = "";    //体质信息

    public BodyConstitutionPoint(){ }

    public BodyConstitutionPoint(String BodyConstitutionTypes, double SelectionScore, double ConversionScore, String QuestionNum, String BCTInfo)
    {
        this.BodyConstitutionTypes = BodyConstitutionTypes;
        this.SelectionScore = SelectionScore;
        this.ConversionScore = ConversionScore;
        this.QuestionNum = QuestionNum;
        this.BCTInfo = BCTInfo;
    }

    public BodyConstitutionPoint(String BodyConstitutionTypes, double SelectionScore, String QuestionNum)
    {
        this.BodyConstitutionTypes = BodyConstitutionTypes;
        this.SelectionScore = SelectionScore;
        this.QuestionNum = QuestionNum;
//        this.ConversionScore = ConversionScore;
    }

    public BodyConstitutionPoint(String BodyConstitutionTypes, double ConversionScore)
    {
        this.BodyConstitutionTypes = BodyConstitutionTypes;
        this.ConversionScore = ConversionScore;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        //切记非常重要, 写数据(out.write...)和下面的读数据(in.read...)的顺序一定要和声明的属性顺序对应上, 不然会因为读写的数据类型不一致而报异常
        dest.writeString(BodyConstitutionTypes);
        dest.writeDouble(SelectionScore);
        dest.writeDouble(ConversionScore);
        dest.writeString(QuestionNum);
        dest.writeString(BCTInfo);
    }

    protected BodyConstitutionPoint(Parcel in) {
        BodyConstitutionTypes = in.readString();
        SelectionScore = in.readDouble();
        ConversionScore = in.readDouble();
        QuestionNum = in.readString();
        BCTInfo = in.readString();
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<BodyConstitutionPoint> CREATOR = new Creator<BodyConstitutionPoint>() {
        @Override
        public BodyConstitutionPoint createFromParcel(Parcel in) {
            return new BodyConstitutionPoint(in);
        }

        @Override
        public BodyConstitutionPoint[] newArray(int size) {
            return new BodyConstitutionPoint[size];
        }
    };

    public double getSelectionScore() {
        return SelectionScore;
    }

    public void setSelectionScore(double selectionScore) {
        SelectionScore = selectionScore;
    }

    public double getConversionScore() {
        return ConversionScore;
    }

    public void setConversionScore(double conversionScore) {
        ConversionScore = conversionScore;
    }

    public String getBodyConstitutionTypes() {
        return BodyConstitutionTypes;
    }

    public void setBodyConstitutionTypes(String bodyConstitutionTypes) {
        BodyConstitutionTypes = bodyConstitutionTypes;
    }


    public String getQuestionNum() {
        return QuestionNum;
    }

    public void setQuestionNum(String questionNum) {
        QuestionNum = questionNum;
    }

    public String getBCTInfo() {
        return BCTInfo;
    }

    public void setBCTInfo(String BCTInfo) {
        this.BCTInfo = BCTInfo;
    }

}
